var express = require('express');
var router = express.Router();
var Album = require('./model');

/* GET home page. */
router.get('/list?name', async function(req, res, next) {
	console.log('------params', req.params);
	console.log('------body', req.body);
	const name = req.params.name;
	var data;
  	if(name === '全部'){
  		data = await Album.find();
  	}
  	res.send({status: '0', data})
});



module.exports = router;
